import React from 'react'
import style from './style.module.scss'
interface tabdiseaseStart{
    title:string,
    disease?:string,
    timer?:string,
    treatmentHospital?:string,
    picture?:string
}
export const MyTagdisease:React.FC<tabdiseaseStart>=({title,disease,timer,treatmentHospital,picture})=> {
  if(!(timer&&treatmentHospital)){
    if (disease) {
      return (
        <div className={style.mytagdisease}>
            <div className={style.title}><span>[</span><p>{title}</p><span>]</span></div>
            <div className={style.disease}>
                {disease}
            </div>
        </div>
      )
    }else{
      return (
        <div className={style.mytagdisease}>
            <div className={style.title}><span>[</span><p>{title}</p><span>]</span></div>
            <div className={style.disease}>
                <img src={picture} alt="" />
            </div>
        </div>
      )
    }
  }else{
    return (
        <div className={style.mytagdisease}>
            <div className={style.title}><span>[</span><p>{title}</p><span>]</span></div>
            <div className={style.treatmentHospital}>
              <span>{treatmentHospital}</span>
              <span>{timer}</span>
            </div>
            <div className={style.disease}>
                {disease}
            </div>
        </div>
      )
  }
}
